package com.jxwifi.cloud.quickclean.adapter;

import android.support.annotation.LayoutRes;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jxwifi.cloud.quickclean.R;
import com.jxwifi.cloud.quickclean.bean.AssemblesBean;

public class AssembleTypeAdapter extends BaseQuickAdapter<AssemblesBean, BaseViewHolder> {

    private int mImdex;

    public AssembleTypeAdapter(@LayoutRes int layoutResId){
        super(layoutResId,null);
        //mImdex=index;
    }

    @Override
    protected void convert(BaseViewHolder helper, AssemblesBean item) {

        //assemble_main_package
        if (item.isCheck()){
            helper.setBackgroundRes(R.id.assemble_main_package, R.drawable.shap_with_bg_un);
        }else{
            helper.setBackgroundRes(R.id.assemble_main_package,R.drawable.shap_with_bg);
        }
        helper.setText(R.id.assemble_main_package,item.getTypeName());
    }
}
